﻿using System;
using System.ComponentModel;

namespace NTrace.VSPackage
{
    public class FlagEntry : ObservableObject
    {
        private String name;
        private int flag;

        public FlagEntry()
        {
        }

        public FlagEntry(String name, int flag)
        {
            this.Name = name;
            this.Flag = flag;
        }

        public int Flag
        {
            get { return this.flag; }
            set
            {
                if (this.flag == value) return;
                this.flag = value;
                this.RaisePropertyChanged("Flag");
            }
        }
        public uint Value
        {
            get
            {
                return (uint)Math.Pow(2, this.Flag);
            }
        }
        public String Name
        {
            get { return this.name; }
            set
            {
                if (this.name == value) return;
                this.name = value;
                this.RaisePropertyChanged("Name");
            }
        }
    }
}
